chrome.extension.onMessage.addListener(
 function(request, sender, sendResponse) {
		var image = 'Crafting_Profession_Generic.png';
		if(request.type == "load"){
			image = "title.png";
		}
		
			// Create a simple text notification:
		var notify = webkitNotifications.createNotification(
		  image,  // icon url - can be relative
		  request.title,  // notification title
		  request.msg  // notification body text
		  
		);	

		notify.show();
		
		notify.onclick = function () {
			
			chrome.tabs.update(sender.tab.id,{selected:true});
		}

		setTimeout(function(){ notify.cancel(); },5000);
		sendResponse({returnMsg: "All good!"}); // optional response
 });
